home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-28 | 16.8 KB | 654 lines | [TEXT/MPS ] |
- /*
- File: SecondStomach.r
-
- Contains: *** put contents here ***
-
- Written by: Steve Datnow
-
- Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- 8/17/93 SLD Add popup menu resource
- 1/7/92 SLD Created
-
- To Do:
- */
-
-
- //--------------------------------------------------------------------------------------------------
- // INCLUDE FILES
- //--------------------------------------------------------------------------------------------------
-
- // Standard Includes
-
- #ifndef __TYPES.R__
- #include "Types.r"
- #endif
-
- #ifndef __SYSTYPES.R__
- #include "SysTypes.r"
- #endif
-
- #ifndef __BalloonTypes__
- #include "BalloonTypes.r"
- #endif
-
- #ifndef __MacAppTypes__
- #include "MacAppTypes.r"
- #endif
-
- #ifndef __ViewTypes__
- #include "ViewTypes.r"
- #endif
-
- #if qDebug
- include "Debug.rsrc" not 'ckid';
- #endif
-
- include "MacApp.rsrc" not 'ckid';
-
- // Includes for Building Blocks
-
- include "Printing.rsrc" not 'ckid';
- include "Dialog.rsrc" not 'ckid';
-
- // Include Code Resources
-
- include $$Shell("ObjApp")$$Shell("XAppName") 'CODE';
-
- //--------------------------------------------------------------------------------------------------
- // CONSTANTS
- //--------------------------------------------------------------------------------------------------
-
- // Finder Information
- // ------------------
-
- #define kApplicationName $$Shell("XAppName")
- #define kSignature 'SS01' // Application signature
- #define kFileType 'SF01' // Data file type
- #define kStationery 'sF01' // Stationery file type
-
- // Bundle Constants
- // ------------------
-
- #define kBundleID 128
- #define kApplicationID 128
- #define kDocumentID 129
- #define kStationeryID 130
-
- // Constants for Menu IDs
- // ----------------------
-
- #define mSecondStomachMenu 4
-
- #define mAdmin 5
-
- // Command Numbers For Menu Items
- // ------------------------------
-
- #define cInitiateSession 400
- #define cCommandHandledByDocument 401
- #define cCommandHandledByView 402
- #define cTrackerCommand 403
-
- // STR# resources
- // --------------
-
- #define kSecondStomachMenuHelp 5000
- #define kSecondStomachWindowTitles 1001
-
- // Text styles
- // --------------
-
- #define kSystemTextStyle 1000
-
- // 'View' resources
- // --------------
-
- #define kSecondStomachWindowID 1000
-
- // Memory Management Resources
- // ---------------------------
-
- #define kSecondStomachSeg 1000
- #define kSecondStomachMem 1000
- #define kSecondStomachRes 1000
-
- // String resources for status information table
- // ---------------------------
-
- #define kStatusInfoTable 2001
-
- //--------------------------------------------------------------------------------------------------
- // RESOURCES FOR MENUS
- //--------------------------------------------------------------------------------------------------
-
- //--------------------------------------------------------------------------------------------------
- // Menu Bars
- //--------------------------------------------------------------------------------------------------
-
- resource 'MBAR' (kMBarDisplayed,
- #if qNames
- kApplicationName,
- #endif
- purgeable) {
- { mApple; mFile; mEdit; mAdmin}
- };
-
- //--------------------------------------------------------------------------------------------------
- // Menus
- //--------------------------------------------------------------------------------------------------
-
- include "Defaults.rsrc" 'CMNU' (mApple); // Grab the default Apple menus
- include "Defaults.rsrc" 'CMNU' (mFile); // Grab the default File menus
- include "Defaults.rsrc" 'CMNU' (mEdit); // Grab the default Edit menu
-
- resource 'CMNU' (mSecondStomachMenu,
- #if qNames
- "SecondStomach Menu",
- #endif
- nonpurgeable) {
- mSecondStomachMenu,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "SecondStomachMenu",
- { /* array: 3 elements */
- /* [1] */ "Command Handled By Application",noIcon, "1", noMark, plain, 999;
- /* [2] */ "Command Handled By Document", noIcon, "2", noMark, plain, cCommandHandledByDocument;
- /* [3] */ "Command Handled By View", noIcon, "3", noMark, plain, cCommandHandledByView;
- }
- };
-
- resource 'CMNU' (mAdmin,
- #if qNames
- "Admin",
- #endif
- nonpurgeable) {
- mAdmin,
- textMenuProc,
- EnablingManagedByMacApp,
- enabled,
- "Admin",
- { /* array: 3 elements */
- "Configure 1",noIcon, "1", noMark, plain, 2001;
- "Applelink Account Setup", noIcon, "2", noMark, plain, 4000;
- "Applelink Connectivity Setup", noIcon, "3", noMark, plain, 4002;
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // Table of status information and default values
- //--------------------------------------------------------------------------------------------------
- #if false
- resource 'STR#' (kStatusInfoTable, purgeable) {
- {
- "•001",
- "#0",
- "•002",
- "No Information",
- "•003",
- "Nothing to report",
- "•004",
- "#20",
- }
- };
- #endif
-
- //--------------------------------------------------------------------------------------------------
- // Balloon Help Resources for Menus
- //--------------------------------------------------------------------------------------------------
-
- #include $$Shell("MALibraries") "HelpStrings.r";
-
- include "Defaults.rsrc" 'hmnu' (mFile);
- include "Defaults.rsrc" 'hmnu' (mEdit);
-
- resource 'STR#' (kSecondStomachMenuHelp, purgeable) {
- {
- "No help yet for this item",
- "Help For Menu Title",
- "Help For First Menu Item",
- "Help For Second Menu Item",
- "Help For Third Menu Item",
- }
- };
-
- resource 'hmnu' (mSecondStomachMenu)
- {
- HelpMgrVersion,
- hmDefaultOptions,
- 0, // balloon definition function
- 0, // variation code
-
- // Missing items
- HMStringResItem
- {
- kSecondStomachMenuHelp,1,
- kSecondStomachMenuHelp,1,
- kSecondStomachMenuHelp,1,
- kSecondStomachMenuHelp,1,
- },
-
- // Title and items
- {
- // Title
- HMStringResItem
- {
- kSecondStomachMenuHelp,2,
- kSecondStomachMenuHelp,2,
- kSecondStomachMenuHelp,2,
- kSecondStomachMenuHelp,2,
- },
- // First Item
- HMStringResItem
- {
- kSecondStomachMenuHelp,3,
- kSecondStomachMenuHelp,3,
- kSecondStomachMenuHelp,3,
- kSecondStomachMenuHelp,3,
- },
- // Second Item
- HMStringResItem
- {
- kSecondStomachMenuHelp,4,
- kSecondStomachMenuHelp,4,
- kSecondStomachMenuHelp,4,
- kSecondStomachMenuHelp,4,
- },
- // Third Item
- HMStringResItem
- {
- kSecondStomachMenuHelp,5,
- kSecondStomachMenuHelp,5,
- kSecondStomachMenuHelp,5,
- kSecondStomachMenuHelp,5,
- },
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // RESOURCES FOR VIEWS, DIALOGS, ALERTS etc.
- //--------------------------------------------------------------------------------------------------
-
- include "SecondStomach.resources" not 'ckid';
- #if false
- //--------------------------------------------------------------------------------------------------
- // Views
- //--------------------------------------------------------------------------------------------------
-
- resource 'STR#' (kSecondStomachWindowTitles,
- #if qNames
- "Window titles",
- #endif
- purgeable) {
- {
- ""
- }
- };
-
- resource 'TxSt' (kSystemTextStyle, purgeable) {tsPlain, 0, black, ""};
-
- resource 'View' (kSecondStomachWindowID,
- #if qNames
- "kSecondStomachWindowID",
- #endif
- purgeable) { MAThreeOh,
- {
- ViewSignatureAndClassname
- {'wind', 534, "", 'WIND', enabled, noIdle, {}, MAThreeOh,
- {50, 20}, {260, 430}, sizeVariable, sizeVariable, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- AdornerListSignatureAndClassname {NoIdentifier, AdornerList, AdornerElementSize, AdornerElementSizeShift, DynamicArrayAllocationIncrement, {
- AdornFirst, AdornerLocalObject {EraseAdorner},
- DrawView, AdornerLocalObject {DrawAdorner},
- AdornLast, AdornerLocalObject {ResizeIconAdorner}}}, emptyUserArea,
- Window {zoomDocProc, 'SKEL', goAwayBox, resizable, ignoreFirstClick,
- freeOnClosing, disposeOnFree, closesDocument, openWithDocument, dontAdaptToScreen, stagger, forceOnScreen,
- dontCenter, doesntFloat, doesntHideOnSuspend, generateActivates, filler, kSecondStomachWindowTitles, 1}, 3},
- ViewSignatureAndClassname
- {'scrl', 186, "", 'SCLR', enabled, noIdle, {}, MAThreeOh,
- {0, 0}, {245, 415}, sizeRelSuperView, sizeRelSuperView, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- Scroller {'vCLR', 'hCLR', {0, 0}, {16, 16}, VertConstrain, HorzConstrain, noInset, respondsToFKeys}, 1},
- ViewSignatureAndClassname
- {'view', 75, "TViewSecondStomach", 'SKEL', enabled, noIdle, {}, MAThreeOh,
- {0, 0}, {72 * 15, 72 * 12}, sizeFixed, sizeFixed, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- View {},
- NoSubviews},
- ViewSignatureAndClassname
- {'ssbr', 101, "", 'hCLR', enabled, noIdle, {}, MAThreeOh,
- {245, -1}, {16, 417}, sizeVariable, sizeVariable, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- ScrollerScrollBar {mVScrollBarHit, notHilited, notDimmed, sizeable, noInset, kSystemTextStyle, dontPreferOutline, h, 0, 0, 39585},
- NoSubviews},
- ViewSignatureAndClassname
- {'ssbr', 101, "", 'vCLR', enabled, noIdle, {}, MAThreeOh,
- {-1, 415}, {247, 16}, sizeVariable, sizeVariable, shown, doesntWantToBeTarget,
- handlesCursor, letsSubViewsHandleCursor, noCursorID,
- handlesHelp, letsSubViewsHandleHelp, noHelpID, 1,
- NoDrawingEnvironment {},
- NoAdorners {}, emptyUserArea,
- ScrollerScrollBar {mVScrollBarHit, notHilited, notDimmed, sizeable, noInset, kSystemTextStyle, dontPreferOutline, v, 0, 0, 49755},
- NoSubviews}
- }
- };
-
- #endif
-
- //--------------------------------------------------------------------------------------------------
- // About Box
- //--------------------------------------------------------------------------------------------------
-
- resource 'DITL' (phAboutApp,
- #if qNames
- "phAboutApp",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {160, 182, 180, 262},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 75, 150, 316},
- StaticText {
- disabled,
- "Second Stomach."
- "\nSteve Datnow 1992"
- "\n\nThis program was written "
- "with MacApp® © 1985-1991 Apple Computer, Inc."
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 1
- }
- }
- };
-
- include "Defaults.rsrc" 'ALRT' (phAboutApp); // Grab the default about box
-
- #if false
- include "Defaults.rsrc" 'STR#' (kDefaultCredits); // Grab the default credits
- #endif
-
- resource 'STR#' (kDefaultCredits,
- #if qNames
- "Other info",
- #endif
- purgeable) {
- {
- "Developed by the",
- "Bovine Server Gateway project.",
- "Tools and Tech Integration",
- "IS&T",
- "Keith Stattenfield",
- "Per Hjartøy",
- "Steve Datnow",
- "Paul Lodrige",
- "Romana Machado",
- "Amr Eissa",
- "Kai Johnson",
- "Alberto Yepez",
- "and other evil bovines!",
- }
- };
- //--------------------------------------------------------------------------------------------------
- // MultiFinder™ information
- //--------------------------------------------------------------------------------------------------
-
- resource 'SIZE' (-1) {
- saveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
- doesActivateOnFGSwitch,
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreAppDiedEvents,
- is32BitCompatible,
- isHighLevelEventAware,
- localAndRemoteHLEvents,
- notStationeryAware,
- reserved,
- reserved,
- reserved,
- reserved,
- #if qModelFarCode
- 575 * 1024,
- 550 * 1024,
- #elif qDebug
- 500 * 1024,
- 475 * 1024
- #else
- 650 * 1024,
- 600 * 1024
- #endif
- };
-
- //--------------------------------------------------------------------------------------------------
- // Icons
- //--------------------------------------------------------------------------------------------------
- #if false
- include "Defaults.rsrc" 'ICN#' (kApplicationID); // MacApp Family large black & white
- #endif
- include "Defaults.rsrc" 'ICN#' (kDocumentID); // MacApp Document large black & white
- include "Defaults.rsrc" 'ICN#' (kStationeryID); // MacApp Stationery large black & white
- #if false
- include "Defaults.rsrc" 'ics#' (kApplicationID); // MacApp Family small black & white
- #endif
- include "Defaults.rsrc" 'ics#' (kDocumentID); // MacApp Document small black & white
- include "Defaults.rsrc" 'ics#' (kStationeryID); // MacApp Stationery small black & white
- #if false
- include "Defaults.rsrc" 'ics4' (kApplicationID); // MacApp Family small 4 bit
- #endif
- include "Defaults.rsrc" 'ics4' (kDocumentID); // MacApp Document small 4 bit
- include "Defaults.rsrc" 'ics4' (kStationeryID); // MacApp Stationery small 4 bit
- #if false
- include "Defaults.rsrc" 'ics8' (kApplicationID); // MacApp Family small 4 bit
- #endif
- include "Defaults.rsrc" 'ics8' (kDocumentID); // MacApp Document small 4 bit
- include "Defaults.rsrc" 'ics8' (kStationeryID); // MacApp Stationery small 4 bit
- #if false
- include "Defaults.rsrc" 'icl4' (kApplicationID); // MacApp Family large 4 bit
- #endif
- include "Defaults.rsrc" 'icl4' (kDocumentID); // MacApp Document large 4 bit
- include "Defaults.rsrc" 'icl4' (kStationeryID); // MacApp Stationery large 4 bit
- #if false
- include "Defaults.rsrc" 'icl8' (kApplicationID); // MacApp Family large 8 bit
- #endif
- include "Defaults.rsrc" 'icl8' (kDocumentID); // MacApp Document large 8 bit
- include "Defaults.rsrc" 'icl8' (kStationeryID); // MacApp Stationery large 8 bit
-
- //--------------------------------------------------------------------------------------------------
- // Memory usage information for MacApp™
- //--------------------------------------------------------------------------------------------------
-
- // See UMemory.h
- // -------------
-
- resource 'seg!' (kSecondStomachSeg,
- #if qNames
- kApplicationName,
- #endif
- purgeable) {
- {
- "GNonRes";
- "GClose";
- "GFile";
- "GOpen";
- "GSelCommand";
- "BBNonRes";
- "BBOpen";
- "GNonRes2";
- "GPrint";
- "GReadResources";
- "foo";
- }
- };
-
- // Additional Memory Requirements
- // ------------------------------
-
- resource 'mem!' (kSecondStomachMem,
- #if qNames
- "Additional Memory Requirements",
- #endif
- purgeable) {
- 0, // Add to temporary reserve
- 0, // Add to permanent reserve
- 0 // Add to stack space
- };
-
- // Additional Resident Segments
- // ----------------------------
-
- resource 'res!' (kSecondStomachRes,
- #if qNames
- kApplicationName,
- #endif
- purgeable) {
- {
- "SecondStomachRes1";
- "SecondStomachRes2";
- };
- };
-
- //--------------------------------------------------------------------------------------------------
- // Icons, Bundles and FRefs… Oh my! (don't forget the Signature)
- //--------------------------------------------------------------------------------------------------
-
- type kSignature as 'STR ';
- resource kSignature (0,
- #if qNames
- "Signature",
- #endif
- purgeable) {
- "SecondStomach 3.0b2PQR ©Apple Computer, Inc. 1988-1991"
- };
-
- resource 'FREF' (kApplicationID,
- #if qNames
- "SecondStomach Application",
- #endif
- purgeable) {
- 'APPL',
- 0,
- ""
- };
-
- resource 'FREF' (kDocumentID,
- #if qNames
- "SecondStomach Document",
- #endif
- purgeable) {
- kFileType,
- 1,
- ""
- };
-
- resource 'FREF' (kStationeryID,
- #if qNames
- "SecondStomach Stationery",
- #endif
- purgeable) {
- kStationery,
- 2,
- ""
- };
-
- resource 'BNDL' (kBundleID,
- #if qNames
- "SecondStomach",
- #endif
- purgeable) {
- kSignature,
- 0,
- { /* array TypeArray: 2 elements */
- /* [1] */
- 'ICN#',
- { /* array IDArray: 3 elements */
- 0, kApplicationID,
- 1, kDocumentID,
- 2, kStationeryID
- },
- /* [2] */
- 'FREF',
- { /* array IDArray: 3 elements */
- 0, kApplicationID,
- 1, kDocumentID,
- 2, kStationeryID
- }
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // Version resources
- //--------------------------------------------------------------------------------------------------
-
- // The revision of this particular file
-
- RESOURCE 'vers' (1,
- #if qNames
- "File Version",
- #endif
- purgeable) {
- 0x01,
- 0x00,
- beta,
- 0x0A,
- verUs,
- "1.0b1",
- "Status Monitor 1.0b1, ©Apple Computer, Inc. 1988-1992"
- };
- include "Defaults.rsrc" 'vers' (2); // Overall package
-
- //--------------------------------------------------------------------------------------------------
- // AppleEvent resources
- //--------------------------------------------------------------------------------------------------
-
- #define cUpdateMonitor 1000
- #define cAreYouStillAlive 102
- #define cMonitorCommand 103
- #define cSetConfigCommand 104
- #define cGetConfigCommand 105
-
- RESOURCE 'aedt' (1000) {{
- 'stmn','updt', cUpdateMonitor;
- 'stmn','alve', cAreYouStillAlive;
- 'stmn','butt', cMonitorCommand;
- 'stmn','sfig', cSetConfigCommand;
- 'stmn','gfig', cGetConfigCommand;
- }
- };
-
- //--------------------------------------------------------------------------------------------------
- // Minimum window size Horz, Vert
- //--------------------------------------------------------------------------------------------------
-
- type 'mWin' {
- unsigned longint; /* Horz */
- unsigned longint; /* Vert */
- };
-
- RESOURCE 'mWin' (1000) {
- 280,
- 186;
- };